<?php

/**
 * LicenseeFrontend form.
 *
 * @package    cpfaizenay
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: EditUserNameForm.class.php 20147 2009-07-13 11:46:57Z FabianLange $
 */
class LicenseeFrontendForm extends LicenseeForm {

   public function configure() {
        parent::configure();

        unset($this['id'], $this['team_id'], $this['licensee_user_id'], $this['lastname'], $this['firstname']);

        $this->validatorSchema['licensee_number']->setOption('required', false);

        sfApplicationConfiguration::getActive()->loadHelpers('Url'); // obligatoire pour pouvoir utiliser url_for

        $autocomplete = new sfWidgetFormDoctrineJQueryAutocompleter(array('model' => 'Club', 'url' => url_for('@autocompleteClub')));
        $this->widgetSchema['club_id'] = $autocomplete;
   }
}
